// vite.config.ts
import { defineConfig, loadEnv } from "file:///C:/Users/86182/Desktop/work/%E8%B5%84%E9%98%B3%E5%B8%82%E7%9F%A5%E8%AF%86%E4%BA%A7%E6%9D%83%E5%85%AC%E5%85%B1%E6%9C%8D%E5%8A%A1%E5%B9%B3%E5%8F%B0/ziyang/node_modules/.pnpm/vite@4.3.9_@types+node@20.12.11_sass@1.62.1/node_modules/vite/dist/node/index.js";
import vue from "file:///C:/Users/86182/Desktop/work/%E8%B5%84%E9%98%B3%E5%B8%82%E7%9F%A5%E8%AF%86%E4%BA%A7%E6%9D%83%E5%85%AC%E5%85%B1%E6%9C%8D%E5%8A%A1%E5%B9%B3%E5%8F%B0/ziyang/node_modules/.pnpm/@vitejs+plugin-vue@4.1.0_vite@4.3.9_vue@3.2.47/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import path from "path";
import px2rem from "file:///C:/Users/86182/Desktop/work/%E8%B5%84%E9%98%B3%E5%B8%82%E7%9F%A5%E8%AF%86%E4%BA%A7%E6%9D%83%E5%85%AC%E5%85%B1%E6%9C%8D%E5%8A%A1%E5%B9%B3%E5%8F%B0/ziyang/node_modules/.pnpm/postcss-px2rem@0.3.0/node_modules/postcss-px2rem/index.js";
import postcssPxToViewport from "file:///C:/Users/86182/Desktop/work/%E8%B5%84%E9%98%B3%E5%B8%82%E7%9F%A5%E8%AF%86%E4%BA%A7%E6%9D%83%E5%85%AC%E5%85%B1%E6%9C%8D%E5%8A%A1%E5%B9%B3%E5%8F%B0/ziyang/node_modules/.pnpm/postcss-px-to-viewport@1.1.0/node_modules/postcss-px-to-viewport/index.js";
import { createSvgIconsPlugin } from "file:///C:/Users/86182/Desktop/work/%E8%B5%84%E9%98%B3%E5%B8%82%E7%9F%A5%E8%AF%86%E4%BA%A7%E6%9D%83%E5%85%AC%E5%85%B1%E6%9C%8D%E5%8A%A1%E5%B9%B3%E5%8F%B0/ziyang/node_modules/.pnpm/vite-plugin-svg-icons@2.0.1_vite@4.3.9/node_modules/vite-plugin-svg-icons/dist/index.mjs";
import Unocss from "file:///C:/Users/86182/Desktop/work/%E8%B5%84%E9%98%B3%E5%B8%82%E7%9F%A5%E8%AF%86%E4%BA%A7%E6%9D%83%E5%85%AC%E5%85%B1%E6%9C%8D%E5%8A%A1%E5%B9%B3%E5%8F%B0/ziyang/node_modules/.pnpm/unocss@0.52.7_postcss@8.4.24_vite@4.3.9/node_modules/unocss/dist/vite.mjs";
import { presetUno, presetAttributify, presetIcons } from "file:///C:/Users/86182/Desktop/work/%E8%B5%84%E9%98%B3%E5%B8%82%E7%9F%A5%E8%AF%86%E4%BA%A7%E6%9D%83%E5%85%AC%E5%85%B1%E6%9C%8D%E5%8A%A1%E5%B9%B3%E5%8F%B0/ziyang/node_modules/.pnpm/unocss@0.52.7_postcss@8.4.24_vite@4.3.9/node_modules/unocss/dist/index.mjs";
var vite_config_default = defineConfig(({ command, mode }) => {
  let env = loadEnv(mode, process.cwd());
  return {
    plugins: [
      vue(),
      Unocss({
        // 使用Unocss
        presets: [presetUno(), presetAttributify(), presetIcons()]
      }),
      createSvgIconsPlugin({
        iconDirs: [path.resolve(process.cwd(), "src/assets/icons")],
        symbolId: "icon-[dir]-[name]",
        customDomId: "__svg__icons__dom__"
      })
    ],
    resolve: {
      alias: {
        "@": path.resolve("./src")
        // 相对路径别名配置，使用 @ 代替 src
      }
    },
    // scss全局变量的配置
    css: {
      // loaderOptions: {
      // postcss: {
      //   plugins: [
      //     px2rem({
      //       remUnit: 192,
      //       propList: ["*"],
      //       exclude: /src\/.*/, 
      //     }),
      //   ],
      // },
      // },
      preprocessorOptions: {
        scss: {
          javascriptEnabled: true,
          additionalData: '@import "./src/styles/variable.scss";'
        }
      },
      postcss: {
        plugins: [
          px2rem({
            remUnit: 192
          }),
          postcssPxToViewport({
            viewportWidth: 1920,
            //---基于1920宽度为100vw
            // exclude: [/service\.vue/]
            exclude: [/\/service\//, /service\/index\.vue$/]
          })
        ]
      }
    },
    build: {
      outDir: "ziyang-dist",
      //指定输出路径
      assetsDir: "assets"
      // 指定生成静态资源的存放路径
    },
    //代理跨域
    server: {
      host: "0.0.0.0",
      publicPath: process.env.NODE_ENV === "production" ? "./" : "/",
      proxy: {
        [env.VITE_APP_BASE_API]: {
          //获取数据的服务器地址设置
          target: env.VITE_SERVE,
          //需要代理跨域
          changeOrigin: true,
          logLevel: "debug"
          //路径重写
          // rewrite: (path) => path.replace(/^\/api/, ''),
        }
      }
    }
  };
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJDOlxcXFxVc2Vyc1xcXFw4NjE4MlxcXFxEZXNrdG9wXFxcXHdvcmtcXFxcXHU4RDQ0XHU5NjMzXHU1RTAyXHU3N0U1XHU4QkM2XHU0RUE3XHU2NzQzXHU1MTZDXHU1MTcxXHU2NzBEXHU1MkExXHU1RTczXHU1M0YwXFxcXHppeWFuZ1wiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9maWxlbmFtZSA9IFwiQzpcXFxcVXNlcnNcXFxcODYxODJcXFxcRGVza3RvcFxcXFx3b3JrXFxcXFx1OEQ0NFx1OTYzM1x1NUUwMlx1NzdFNVx1OEJDNlx1NEVBN1x1Njc0M1x1NTE2Q1x1NTE3MVx1NjcwRFx1NTJBMVx1NUU3M1x1NTNGMFxcXFx6aXlhbmdcXFxcdml0ZS5jb25maWcudHNcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfaW1wb3J0X21ldGFfdXJsID0gXCJmaWxlOi8vL0M6L1VzZXJzLzg2MTgyL0Rlc2t0b3Avd29yay8lRTglQjUlODQlRTklOTglQjMlRTUlQjglODIlRTclOUYlQTUlRTglQUYlODYlRTQlQkElQTclRTYlOUQlOD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